package com.imagination.applet.domain.support.payment.configuration;

import org.springframework.beans.factory.annotation.Value;

//@Configuration
public class WechatPayConfiguration {

    @Value("${payment.wechat.merchant-id}")
    public String merchantId;
    /**
     * 商户API私钥路径
     */
    //@Value("${payment.wechat.private-key-path}")
    //public String privateKey = "/Users/wangyuyang/cert/apiclient_key.pem";
    /**
     * 商户证书序列号
     */
    @Value("${payment.wechat.merchant-serial-number}")
    public String merchantSerialNumber;
    /**
     * 商户APIV3密钥
     */
    @Value("${payment.wechat.api-v3-key}")
    public String apiV3Key;

    @Value("${payment.wechat.notify-url}")
    private String notifyUrl = "";

//    @Bean
//    public Config config() {
//        return new RSAAutoCertificateConfig.Builder()
//                .merchantId(merchantId)
//                //.privateKeyFromPath(privateKey)
//                .merchantSerialNumber(merchantSerialNumber)
//                .apiV3Key(apiV3Key)
//                .build();
//    }

//    @Bean
//    public JsapiService jsApiService(@Autowired(required = false) Config config) {
//        return new JsapiService.Builder()
//                .config(config)
//                .build();
//    }

}
